home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple II Magazines (PO)
/
Nibble Volume 10, No. 03 (1989-03)(MicroSPARC)(Side A).zip
/
Nibble Volume 10, No. 03 (1989-03)(MicroSPARC)(Side A).po
/
STARTUP.bas
< prev
next >
Wrap
BASIC Source File
|
1996-12-24
|
6KB
|
119 lines
10 REM ******* 8/08/86 *******
20 REM * ProDOS STARTUP *
30 REM * BY OWL *
40 REM * COPYRIGHT (C) 1987 *
50 REM * BY MICROSPARC, INC. *
60 REM * CONCORD, MA 01742 *
70 REM ***********************
80 LOMEM: 16384
90 HOME : PRINT :D$ = CHR$(4): PRINT CHR$(21)
100 ONERR GOTO 970
110 REM ********** GET HI-RES SCREEN AND SET DISPLAY SWITCHES
120 VTAB 11: HTAB 3: PRINT "MICROSPARC PRESENTS NIBBLE SOFTWARE"
130 VTAB 15: HTAB 13: PRINT "PLEASE WAIT..."
140 PRINT D$"BRUN STARTUP.SCREEN"
150 G = PEEK( -16297) + PEEK( -16300) + PEEK( -16301) + PEEK( -16304)
160 REM ********** READ INFO FROM NIBMENU TEXTFILE
170 GOSUB 1120
180 DIM P$(20): REM P$ = PROGRAM NAME
190 DIM S$(300): REM S$ = LINES OF TEXT INSTRUCTIONS
200 DIM RC$(20): REM RC$ = COMMAND USED TO RUN PROGRAM
210 DIM MP$(20): REM MP$ = PROGRAM NAME TO APPEAR IN MENU
220 PRINT D$;"OPEN NIBMENU"
230 PRINT D$;"READ NIBMENU"
240 INPUT A$: REM A$ = DISK NAME
250 NA$ = "NIBBLE " +A$: VTAB 22: HTAB 20 -( LEN(NA$)/2): PRINT NA$: VTAB 1
260 INPUT NP: REM NP = NUMBER OF PROGRAMS ON DISK
270 FOR I = 1 TO NP: INPUT P$(I): NEXT I
280 INPUT MM: REM MM = NUMBER OF VALID MENU ENTRIES
290 FOR I = 1 TO MM: INPUT MP$(I): INPUT RC$(I): NEXT I
300 INPUT S$
310 I = 0
320 I = I +1: CALL 768,S$(I)
330 IF MID$ (S$(I),1,1) = "#" THEN 350
340 GOTO 320
350 PRINT D$;"CLOSE"
360 IF PEEK( -1101) < >6 THEN GOSUB 1080: REM ********** UPPER/LOWER CASE ROUTINE
370 REM ********** FIRST TEXT SCREEN
380 TEXT : HOME : VTAB 3
390 PRINT "Thank you for ordering the Nibble": PRINT A$;"!": PRINT
400 PRINT "The programs on this disk are:": PRINT
410 FOR Z = 1 TO NP: HTAB 5: PRINT P$(Z): NEXT Z
420 GOSUB 1030: IF FLAG$ = "ESC" THEN GOTO 600
430 REM ********** CYCLE THRU NIBMENU TEXT SCREENS
440 A = 1
450 HOME : VTAB 3
460 IF S$(A) = "@" THEN GOSUB 1030: HOME : VTAB 3: ON ( NOT (FLAG$ = "ESC")) GOTO 490: GOTO 600
470 IF S$(A) = "#" THEN 510
480 PRINT S$(A)
490 A = A +1: GOTO 460
500 REM ********** LAST TEXT SCREEN BEFORE MENU
510 HOME : VTAB 3
520 HTAB 6: PRINT "Thanks again for your order !"
530 VTAB 12: INVERSE
540 HTAB 6: PRINT "ALL PROGRAMS ON THIS DISK ARE"
550 HTAB 6: PRINT "COPYRIGHT (C) 1988 BY NIBBLE"
560 HTAB 6: PRINT "MICROSPARC, INC. CONCORD, MA"
570 NORMAL : VTAB 17: HTAB 5: PRINT "UNAUTHORIZED COPYING IS ILLEGAL"
580 GOSUB 1030
590 REM ********** SET UP MENU
600 ME = MM +2:X$(0) = " ":X$(1) = "-->": HOME
610 VTAB 1: HTAB 1: PRINT "Selection: <ESC>: Instructions"
620 VTAB 3: PRINT "----------------------------------------";
630 VTAB 5: HTAB 20 -( LEN(A$)/2): PRINT A$
640 FOR I = 1 TO ME -2: VTAB 6 +1 *I: HTAB 8: PRINT I". "MP$(I): NEXT
650 VTAB 6 +1 *(ME -1): HTAB 8: PRINT ME -1". Catalog Disk"
660 VTAB 6 +1 *ME: HTAB 8: PRINT ME". Quit"
670 VTAB 21: PRINT "----------------------------------------"
680 VTAB 23: HTAB 1: PRINT "Type number or use arrows, then <RETURN>";:PX = 10:SX = 4:SL = 1
690 REM ********** SELECT CHOICE
700 N = SL:OS = SL: GOSUB 780:Z = 0: VTAB 24: CALL -868
710 VTAB 1: HTAB 12: PRINT SL: POKE 49168,0: WAIT -16384,128::Z$ = CHR$( PEEK( -16384) -128): IF Z$ > = "1" AND Z$ < = STR$(ME) THEN SL = VAL(Z$):N = OS: GOSUB 780: GOTO 700
720 Z = (Z$ = CHR$(21) OR Z$ = CHR$(10)) -(Z$ = CHR$(8) OR Z$ = CHR$(11)) +10 *(Z$ = CHR$(13)) +20 *(Z$ = CHR$(27)): ON NOT Z GOSUB 950
730 IF Z = 20 THEN GOTO 380
740 SL = SL +Z *(Z <10):SL = SL -ME *(SL >ME) +ME *(SL <1)
750 N = OS: GOSUB 780: ON Z <10 GOTO 700
760 GOTO 800
770 REM ********** PRINT POINTER SUBROUTINE
780 VTAB 6 +1 *N: HTAB SX: PRINT X$(SL = OS);: RETURN
790 REM ********** SELECTION ROUTINE
800 IF SL = (ME -1) THEN GOSUB 860: GOTO 600
810 IF SL = ME THEN GOSUB 900:SL = 1: GOSUB 780: GOTO 680
820 VTAB 2: HTAB 1: PRINT " ": INVERSE : VTAB 2: HTAB 1: PRINT RC$(SL): NORMAL
830 REM ********** EXECUTE A VALID MENU CHOICE
840 POKE 49168,0: PRINT : GOSUB 1100: PRINT D$;RC$(SL)
850 REM ********** CATALOG SELECTED
860 HOME : POKE 49168,0: PRINT : PRINT D$;"CAT": PRINT
870 VTAB 24: HTAB 7: PRINT "Press <RETURN> to continue";
880 POKE 49168,0: WAIT 49152,128: RETURN
890 REM ********** QUIT SELECTED
900 VTAB 22: PRINT : CALL -958: PRINT "Do you really want to quit? (Y/N)";: POKE 49168,0
910 POKE 49168,0: WAIT 49152,128
920 IF PEEK(49152) = 249 OR PEEK(49152) = 217 THEN POKE 49168,0: HOME : GOSUB 1100: END
930 RETURN
940 REM ********** SOUND BUZZER FOR WRONG KEYSTROKE
950 FOR EQ = 1 TO 10:EY = PEEK( -16336) - PEEK( -16336): NEXT EQ: RETURN
960 REM ********** ERROR HANDLING ROUTINE
970 HOME : TEXT
980 IF PEEK( -1101) < >6 THEN HOME : PRINT D$"PR#A$300"
990 IF PEEK(222) = 6 OR PEEK(222) = 8 THEN VTAB 19: PRINT CHR$(7);"Disk Error. Please insert Nibble disk": GOTO 1010
1000 VTAB 19: PRINT CHR$(7);"An error #" PEEK(222)" has occurred. "
1010 VTAB 23: PRINT "Press <RETURN> to continue ";: CALL -958: POKE 49168,0: WAIT 49152,128: GOTO 600
1020 REM ********** WAIT FOR KEYSTROKE
1030 FLAG$ = ""
1040 VTAB 23: PRINT "<RETURN> for next page or <ESC> for menu";: POKE 49168,0: WAIT 49152,128
1050 IF PEEK(49152) = 155 THEN FLAG$ = "ESC"
1060 RETURN
1070 REM *********** ATTACH UPPER/LOWER CASE ROUTINE
1080 FOR I = 0 TO 13: READ ML: POKE 768 +I,ML: NEXT I: PRINT D$"PR#A$300": RETURN
1090 REM ********** DETACH UPPER/LOWER CASE HANDLER
1100 PRINT CHR$(4);"PR#0": RETURN
1110 REM ********** INSTALL INPUT-ANYTHING ROUTINE
1120 FOR X = 768 TO 839: READ A: POKE X,A: NEXT : RETURN
1130 REM ********** INPUT-ANYTHING ROUTINE DATA
1140 DATA 32,190,222,32,227,223,36,17,208,5,162,163,76,18,212,133,133,132,134,165
1150 DATA 184,164,185,133,135,132,136,32,44,213,173,0,2,201,3,208,3,76,99,216
1160 DATA 169,0,133,13,133,14,169,0,160,2,32,237,227,32,61,231,32,123,218,165
1170 DATA 135,164,136,133,184,132,185,32,183,0,96,0
1180 REM ********** UPPER/LOWER CASE ROUTINE DATA
1190 DATA 216,201,225,144,6,201,251,176,2,233,31,76,240,253,0